package com.hehe;

import com.hehe.powernode.constant.AuthConstants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication(scanBasePackages = {"com.hehe"})
@Slf4j
@EnableDiscoveryClient
@EnableCaching // 开启注解式缓存(默认使用缓存中间件redis)
@EnableFeignClients//启用Feign支持

public class ManagerServerApplication implements ApplicationRunner {
    @Value("${text1:#{null}}")
    private String text1;

    @Value("${spring.profiles.active:#{null}}")
    private String active;

    @Value("${spring.cloud.nacos.config.file-extension:#{null}}")
    private String extension;
    @Value("${spring.application.name:#{null}}")
    private String application;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("Allow URLs: text1:{}",text1);
        log.info("Allow URLs: active:{}",active);
        log.info("Allow URLs: extension:{}",extension);
        log.info("Allow URLs: application:{}",application);

    }
    public static void main(String[] args) {
        SpringApplication.run(ManagerServerApplication.class,args);
    }
}